<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>WebRTCPlayer</title>
  </head>
  <body>
    <video id="video-webrtc" controls></video>
    <script type="text/javascript" src="./webrtc.min.js"></script>
    <script type="text/javascript">
      const videoDom = document.getElementById('video-webrtc');
      // var url = 'webrtc://osiii.com/live/livestream';
      // var url = 'webrtc://d.ossrs.net/live/livestream';
      const url = 'webrtc://192.168.3.105/live/aa';
      const player = new JSWebrtc.Player(url, {
        video: videoDom,
        autoplay: true,
        onPlay: (obj) => {
          console.log('start play');
        },
      });
    </script>
  </body>
</html>
